package org.example.day01;

/**
 *  第一章节；stop()显示抛出ThreadDeath异常
 */
public class MyThread8 extends Thread{
    @Override
    public void run() {
        try {
            this.stop();
        } catch (ThreadDeath e) {
            e.printStackTrace();
            System.out.println("进入catch方法");
        }
    }

    public static void main(String[] args) {
        MyThread8 m8 = new MyThread8();
        m8.start();
    }
}
